package tsing.javase.designpattern.responsebility;

import com.alibaba.fastjson.JSON;

/**
 * @Date 13/7/2023 下午5:34
 */
public class ResponsibilityDemo {

    public static void main(String[] args) {
        // 创建执行链
        ApprovalHandlerChain approvalHandlerChain = new ApprovalHandlerChain();
        ApprovalHandler chain = approvalHandlerChain.getChain();
        // 执行上下文
        HandleContext handleContext = new HandleContext();
        chain.approval(handleContext);
        System.out.println(JSON.toJSONString(handleContext));
    }
}
